package demo3;

public class Test {

    public static void main(String[] args) {
        Dog dog1 = new Dog("旺财",11);
        Dog dog2 = new Dog("旺财",11);

        System.out.println(dog1 == dog2);
        System.out.println(dog1.equals(dog2));
        System.out.println("=========");
        System.out.println(dog1.hashCode());
        System.out.println(dog2.hashCode());
    }
}
